home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Fireworks 3 / Settings / Commands / Creative / Convert to Grayscale.jsf next >
Encoding:
Text File  |  1999-11-19  |  910 b   |  43 lines

  1. // Copyright (c) 1999 Macromedia. All rights reserved.
  2.  
  3. var pixel = fw.getDocumentDOM().getPixelMask();
  4.  
  5. // Figure out if there is a selection that the user made
  6.  
  7. if (pixel == null){
  8.     
  9.     // Now run the filters
  10.     fw.getDocumentDOM().applyEffects(
  11.         { 
  12.             category:"Untitled",
  13.             effects:[ 
  14.                 { 
  15.                     EffectIsVisible:true,
  16.                     EffectMoaID:"{3439b08d-1922-11d3-9bde00e02910d580}",
  17.                     MB_filter_preview_tile_size:"-1 -1",
  18.                     category:"Adjust Color",
  19.                     hls_colorize:true,
  20.                     hue_amount:0,
  21.                     lightness_amount:0,
  22.                     name:"Hue/Saturation...",
  23.                     saturation_amount:0 
  24.                 } 
  25.             ],
  26.             name:"Untitled" 
  27.         }
  28.     );
  29. } else {
  30.     // Run the filters on the user selected pixels
  31.     fw.getDocumentDOM().filterSelection(
  32.         { 
  33.             EffectMoaID:"{3439b08d-1922-11d3-9bde00e02910d580}",
  34.             MB_filter_preview_tile_size:"-1 -1",
  35.             hls_colorize:true,
  36.             hue_amount:0,
  37.             lightness_amount:0,
  38.             saturation_amount:0 
  39.         }
  40.     );
  41. }
  42.  
  43.